package network.course5Http.https;

import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.X509TrustManager;

/**
 * HTTPS 连接需要用到的信任证书管理器。
 * 目前不理解没关系，只要知道 HTTPS 请求需要实现 X509TrustManager ，构建默认证书管理器即可。
 */
public class TrainX509TrustManager implements X509TrustManager {

    @Override
    public void checkClientTrusted(X509Certificate[] chain, String authType)
            throws CertificateException {
    }

    @Override
    public void checkServerTrusted(X509Certificate[] chain, String authType)
            throws CertificateException {
    }

    @Override
    public X509Certificate[] getAcceptedIssuers() {
        return null;
    }
}
